#include <stdio.h>
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include <SDL/SDL_ttf.h>
#include <SDL/SDL_mixer.h>
#include <assert.h>
#include "SDL\jeu.h"
#include "SDL\Sounds.h"
#include <string.h>
void Chargement (int *pcontinuer,int Nummap)
{
int continuerc=1,i;
char chaine[20];
SDL_Surface *ecrandebut = NULL, *charge= NULL;
SDL_Rect position_charge;
position_charge.x=0;
position_charge.y=0;
SDL_Init(SDL_INIT_VIDEO);
ecrandebut= SDL_SetVideoMode(700, 719, 16, SDL_HWSURFACE | SDL_DOUBLEBUF);
for (i=0;i<=7;i++)
{
switch (i)
{
case 0 : strcpy(chaine,"chargement1.jpg");break;
case 1 : strcpy(chaine,"chargement2.jpg");break;
case 2 : strcpy(chaine,"chargement3.jpg");break;
case 3 : strcpy(chaine,"chargement4.jpg");break;
case 4 : strcpy(chaine,"chargement5.jpg");break;
case 5 : strcpy(chaine,"chargement6.jpg");break;
case 6 : strcpy(chaine,"chargement4.jpg");break;
case 7 : strcpy(chaine,"chargement5.jpg");break;
}
charge= IMG_Load(chaine);
SDL_BlitSurface(charge, NULL, ecrandebut,&position_charge);
SDL_Flip(ecrandebut);
SDL_Delay(500);
SDL_FreeSurface(charge);
}
Musique(Nummap);
jouer(1,Nummap);
SDL_FreeSurface(charge);
SDL_FreeSurface(ecrandebut);
}
